package com.donfu.system.service.house.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.donfu.system.mapper.house.HouseCollectionMapper;
import com.donfu.system.domain.house.HouseCollection;
import com.donfu.system.service.house.IHouseCollectionService;

/**
 * 收藏Service业务层处理
 * 
 * @author donfu
 * @date 2021-12-01
 */
@Service
public class HouseCollectionServiceImpl implements IHouseCollectionService 
{
    @Autowired
    private HouseCollectionMapper houseCollectionMapper;

    /**
     * 查询收藏
     * 
     * @param id 收藏主键
     * @return 收藏
     */
    @Override
    public HouseCollection selectHouseCollectionById(Long id)
    {
        return houseCollectionMapper.selectHouseCollectionById(id);
    }

    /**
     * 查询收藏列表
     * 
     * @param houseCollection 收藏
     * @return 收藏
     */
    @Override
    public List<HouseCollection> selectHouseCollectionList(HouseCollection houseCollection)
    {
        return houseCollectionMapper.selectHouseCollectionList(houseCollection);
    }

    /**
     * 根据用户id 查询收藏列表
     *
     * @param houseCollection 收藏
     * @return 收藏
     */
    @Override
    public List<HouseCollection> selectHouseCollectionByUser(HouseCollection houseCollection) {
        return houseCollectionMapper.selectHouseCollectionByUser(houseCollection);
    }

    /**
     * 新增收藏
     * 
     * @param houseCollection 收藏
     * @return 结果
     */
    @Override
    public int insertHouseCollection(HouseCollection houseCollection)
    {
        return houseCollectionMapper.insertHouseCollection(houseCollection);
    }

    /**
     * 修改收藏
     * 
     * @param houseCollection 收藏
     * @return 结果
     */
    @Override
    public int updateHouseCollection(HouseCollection houseCollection)
    {
        return houseCollectionMapper.updateHouseCollection(houseCollection);
    }

    /**
     * 批量删除收藏
     * 
     * @param ids 需要删除的收藏主键
     * @return 结果
     */
    @Override
    public int deleteHouseCollectionByIds(Long[] ids)
    {
        return houseCollectionMapper.deleteHouseCollectionByIds(ids);
    }

    /**
     * 删除收藏信息
     * 
     * @param id 收藏主键
     * @return 结果
     */
    @Override
    public int deleteHouseCollectionById(Long id)
    {
        return houseCollectionMapper.deleteHouseCollectionById(id);
    }
}
